import { createSlice } from '@reduxjs/toolkit'
const menuSlice = createSlice({
  name: 'menu',
  initialState: {
    isCollapse: false,
    menuList: [],
  },
  reducers: {
    updateCollapse: (state, { payload }) => {
      state.isCollapse = payload
    },
    setMenuList: (state, { payload }) => {
      state.menuList = payload
    },
  },
})
export const { updateCollapse, setMenuList } = menuSlice.actions
export default menuSlice.reducer
